<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="pg" uri="http://jsptags.com/tags/navigation/pager"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="sx" uri="/struts-dojo-tags"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=" http://www.w3.org/1999/xhtml">

	<head>
		<base href="<%=basePath%>">
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>人员奖惩</title>
		<link rel="stylesheet" href="css/vip.css" type="text/css">
		<script type="text/javascript" src="<%=basePath%>js/jquery/jquery.js"></script>
		 <link rel="stylesheet" href="css/box_onfocus.css" type="text/css">
		 <script type="text/javascript" src="<%=basePath%>js/persons.js"></script>
		<script language="javascript" src="<%=basePath%>js/public.js"></script>
		<script language="javascript" src="<%=basePath%>js/highLight.js"></script>
		<script language="javascript" src="<%=basePath%>js/oddEvenColor.js"></script>
		<script language="javascript" src="<%=basePath%>js/addTableAlign.js"></script>
	</head>

	<body>
            		<table>
			<tr height="15">
				<td background="images/shadow_bg.jpg"></td>
			</tr>
		</table>
		<table>
			<tr>
				<td style="text-align: right">
					<form action="persons/employee/employee_rapsearch" method="post">

						姓名:
						<input type="text" name="employee.empName" size="10"
							value="${employee.empName}" class="itemname"/>
						奖惩名称:
						<input type="text" name="employeeRap.rapName" size="10"
							value="${employeeRap.rapName}" class="itemname"/>
						<input class="frm_btn" type="submit" value="模糊查询" />


						<input type="button" value="添加新奖惩"
							onClick="openWin('<%=basePath%>persons/employee/employee_rapaddinput','添加新奖惩情况',800,600,'1')"
							class="frm_btn">
					</form>
				</td>
			</tr>
		</table>

		<table class="title">
			<tr>
				<td>&nbsp;
					
				</td>
			</tr>
		</table>
		<table class="list">
			<tr>

				<th>
					员工号
				</th>

				<th>
					姓名
				</th>

				<th>
					奖惩名称
				</th>
				<th>
					奖惩时间
				</th>

				<th>
					奖惩原因
				</th>
				<th>
					修改
				</th>
				<th>
					删除
				</th>
			</tr>
			<!---------------------------LOOP START------------------------------>
			<c:if test="${!empty pm.datas}">
				<c:forEach items="${pm.datas}" var="employeeRap">
					<tr>

						<td>
							<div align="center">
								<c:out value="${employeeRap.employee.empSn}" />
							</div>
						</td>
						<td>
							<div align="center">
								<c:out value="${employeeRap.employee.empName}" />
							</div>
						</td>
						<td>
							<div align="center">
								<c:out value="${employeeRap.rapName}" />
							</div>
						</td>
						<td>
							<div align="center">
								<fmt:formatDate value="${employeeRap.rapDate}"
									pattern="yyyy-MM-dd" />
							</div>
						</td>

						<td>
							<div align="center">
								<c:out value="${employeeRap.rapReason}" />
							</div>
						</td>

						<td>
							<div align="center">
								<a href="#"
									onClick="openWin('<%=basePath%>persons/employee/employee_rapeditInput?employeeRapId=${employeeRap.empRpId}','编辑人员信息',800,600,'1');return false">
									<img src="<%=basePath%>images/edit.gif" width="15" height="16"
										border="0"> </a>
							</div>
						</td>
						<td align="center">
							<a href="#"
								onclick="del('<%=basePath%>persons/employee/employee_rapdel?employeeRapId=${employeeRap.empRpId}');return false"><img
									src="images/del.gif" width="15" height="16" border="0"> </a>
						</td>

					</tr>
				</c:forEach>
			</c:if>
			<!----------------------LOOP END------------------------------->
			<!-- 在列表数据为空的时候，要显示的提示信息 -->
			<c:if test="${empty pm.datas}">
				<tr>
					<td colspan="11" align="center" bgcolor="#EFF3F7"
						class="TableBody1" onMouseOver=this.bgColor = '#DEE7FF';onmouseout=this.bgColor='#EFF3F7';;>
						没有找到相应的记录
					</td>
				</tr>
			</c:if>
			<!-- 在列表数据为空的时候，要显示的提示信息 -->
		 


					<!-- 分页导航条 开始-->
					<table borderColor=#ffffff style="FONT-SIZE: 10pt" class="pager">
						<tr height=28px valign="middle">
							<th align=right noWrap>
								<pg:pager
									url='<%=request.getAttribute("javax.servlet.forward.servlet_path").toString().substring(1) %>'
									items="${pm.total}" maxPageItems="${pagesize}"
									export="currentPageNumber=pageNumber">
									<pg:param name="employee.empName" />
									<pg:param name="employeeRap.rapName" />


									<pg:first>
										<a href="${pageUrl}" id="firstpageurl">首页</a>
									</pg:first>
									<pg:prev>
										<a href="${pageUrl }">《</a>
									</pg:prev>
									<pg:pages>
										<c:choose>
											<c:when test="${currentPageNumber eq pageNumber}">
												<font color="red">${pageNumber }</font>
											</c:when>
											<c:otherwise>
												<a href="${pageUrl }">${pageNumber }</a>
											</c:otherwise>
										</c:choose>
									</pg:pages>
									<pg:next>
										<a href="${pageUrl }">》</a>
									</pg:next>
									<pg:last>
										<a href="${pageUrl }">尾页</a>
									</pg:last>
								</pg:pager>
								&nbsp;&nbsp;
							</th>
							<!-- 更改pagesize 开始-->
							<th align=left valign="middle" noWrap width="10%">
								<div style="height: 20px; overflow: hidden; valign: middle">
									<form
										action="<%=request.getAttribute("javax.servlet.forward.servlet_path").toString().substring(1)%>">

										<input type="hidden" name="employee.empName"
											value="${employee.empName}" />
										<input type="hidden" name="employeeRap.rapName"
											value="${employeeRap.rapName}" />


										<select name="pagesize" onChange="this.form.submit()"
											style="height: 16px; overflow: hidden; valign: middle">
											<c:forEach begin="1" end="50" step="3" var="i">
												<option value="${i}"
													<c:if test="${pagesize eq i }">selected</c:if>>
													${i}
												</option>
											</c:forEach>
										</select>
										行/页

									</form>
								</div>

							</th>
						</tr>
					</table>



					<!-- 分页导航条 结束-->
				</TD>
			</TR>
		</TABLE>
		<SCRIPT type=text/javascript>
            $(document).ready(registerPre);
        </SCRIPT>
	</body>
</html>